package com.qf;

import com.qf.api.SiteService;
import org.springframework.context.support.ClassPathXmlApplicationContext;

/**
 * Consumer
 *
 * @author JinYe
 * @date 2022/8/10
 **/
public class Consumer {

    public static void main(String[] args) {
        ClassPathXmlApplicationContext context = new ClassPathXmlApplicationContext(new String[]{"consumer.xml"});
        context.start();
        // 从ioc容器中获得SiteService服务提供者的代理对象
        SiteService service = (SiteService) context.getBean("siteService");
        String qf = service.getName("qf");
        System.out.println(qf);
    }
}
